<script>
/**
 * 故障频次
 * 横向柱状图
 */
import BarCharts from "@/pages/report/componet/chartCom/bar-charts.vue";

export default {
  name: "dev-gzpc",
  components: {
    BarCharts
  },
  props: {
    year: {
      type: String,
      default: () => {
        return new Date().getFullYear().toString()
      },
    },
  },

  data() {
    return{
      title: this.year + '月度设备故障频次',
      showTooltip:true,
      xAxis:{ type: 'value', boundaryGap: [0, 0.01]},
      yAxis:{ type: 'category', data: ['202504','202505','202502','202506','202507','202503','202501']},
      series:[
        { name: '故障次数', type: 'bar', data: [100, 200, 300, 400, 500, 600, 700] }
      ]
    }
  }
}
</script>

<template>
  <view class="bar-box">
    <bar-charts
        ref='gzpcBar'
        :showTooltip="showTooltip"
        :title="title"
        :series="series"
        :xAxis="xAxis"
        :yAxis="yAxis"
    />
  </view>
</template>

<style scoped lang="scss">

</style>